package org.itsolutions.javaBackup.core.properties;

import java.util.Arrays;
import java.util.List;

import org.itsolutions.javaBackup.properties.AProperty;
import org.itsolutions.javaBackup.spi.EModule;
import org.itsolutions.javaBackup.spi.ENodeFunctionality;

/**
 * 
 * @param <T> property type
 * @author Tomas Fecko
 */
public final class CoreProperty<T> extends AProperty<T> {
	
	private static final String		PROPERTY_FILE_NAME = "core.properties";
	
	/**
	 * 
	 * @param pPropertyKey property key
	 * @param pDefaultValue default value
	 */
	private CoreProperty(String pPropertyKey, T pDefaultValue) {
		super(pPropertyKey, pDefaultValue);
	}
	
	//CHECKSTYLE:OFF
	public static final AProperty<String> 					FTP_MODULE = new CoreProperty<String>("javaBackup.ftp.module", "org.itsolutions.javaBackup.ftp.FTPModule");	
	public static final AProperty<String> 					GUI_WEB_MODULE = new CoreProperty<String>("javaBackup.gui.web.module", "org.itsolutions.javaBackup.gui.web.GUIWebModule");
	public static final AProperty<String> 					GIT_MODULE = new CoreProperty<String>("javaBackup.git.module", "org.itsolutions.javaBackup.git.GitModule");
	public static final AProperty<List<EModule>> 			NODE_MODULES = new CoreProperty<List<EModule>>("javaBackup.node.modules", Arrays.asList(EModule.UNSPECIFIED));
	public static final AProperty<List<ENodeFunctionality>> NODE_FUNCTIONALITY = new CoreProperty<List<ENodeFunctionality>>("javaBackup.node.functionality", Arrays.asList(new ENodeFunctionality[]{ENodeFunctionality.ALL}));
	
	public static final AProperty<Boolean>					SHOULD_EXCEPTION_STOP_BOOTSTRAPPING = new CoreProperty<Boolean>("javaBackup.should.exception.stop.bootstrapping", Boolean.FALSE);

	//CHECKSTYLE:ON
	
	@Override
	protected String getPropertyFileName() {
		return PROPERTY_FILE_NAME;
	}
}




